package xin.marcher.module.inventory.strategy.route;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 分桶操作路由工厂
 */
@Component
public class BucketOperateStrategyFactory {

    @Autowired
    private Map<String, AbstractOperateStrategy> operateMap = new ConcurrentHashMap<>(16);

    /**
     * 获取 商品状态变更 路由
     *
     * @param operate
     * @return
     */
    public AbstractOperateStrategy getStrategy(String operate) {
        return operateMap.get(operate);
    }

}
